<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<div class="tche-padding">	
    <table cellpadding="0" cellspacing="0" border="0" class="infor-table">
		<tr>
			<td align="right">
				<label class="control-label np">行驶证车主：</label>
			</td>
			<td>
				<div class="control-div np"><label id="name"></label></div>
			</td>
		</tr>
	
		<tr>	
			<td align="right">
				<label class="control-label np">核定载客：</label>
			</td>
			<td>
				<div class="control-div np"><label id="seatNum"></label></div>
			</td>
			<td align="right">
				<label class="control-label np">颜色：</label>
			</td>
			<td>
				<div class="control-div np"><label id="colorCarDisplay"></label></div>
			</td>
		</tr>
	
		<tr>
			<td align="right">
				<label class="control-label np">品牌：</label>
			</td>
			<td>
				<input id="carBrandCode" name="carBrandCode" type="hidden" value="${ywBusinessCar.carBrand }">
				<div class="control-div np"><label id="nameCarBrand"></label></div>
			</td>
			
			<td align="right">
				<label class="control-label np">车系：</label>
			</td>
			<td colspan="3">
				<input id="carSeriesCode" name="carSeriesCode" type="hidden" value="${ywBusinessCar.carSeries }">
				<div class="control-div np"><label id="nameCarSeries"></label></div>
			</td>
		</tr>
	
		<tr>	
			<td align="right">
				<label class="control-label np">车型：</label>
			</td>
			<td colspan="6">
				<input id="carModelCode" name="carModelCode" type="hidden" value="${ywBusinessCar.carModel }">
				<div class="control-div np"><label id="nameCarModel"></label></div>
				</td>
			</tr>
			
			<tr>
				
				<td align="right">
					<label class="control-label np">车牌：</label>
				</td>
				<td>
					<div class="control-div np"><label id="licensePlate"></label></div>
				</td>
				<td align="right">
					<label class="control-label np">车架号：</label>
				</td>
				<td>
					<div class="control-div np"><label id="vin"></label></div>
				</td>
			</tr>
	
			<tr>		
				<td align="right">
					<label class="control-label np">发动机号：</label>
				</td>
				<td>
					<div class="control-div np"><label id="numEngine"></label></div>
				</td>
			</tr>
		</table>	
	</div>
		
<div class="business-manwife">车贷信息</div>	
<div class="tche-padding">	
       	<table cellpadding="0" cellspacing="0" border="0" class="infor-table">
		<tr>	
			<td align="right">
				<label class="control-label np">车价：</label>
			</td>
			<td>
				<div class="control-div np" id=""><label id="price"></label></div>
			</td>
			<td align="right">
				<label class="control-label np">首付比例：</label>
			</td>
			<td>
				<div class="control-div np" id="" ><label id="firstBili"></label></div>
			</td>
			<td align="right">
				<label class="control-label np">首付金额：</label>
			</td>
			<td>
				<div class="control-div np" id=""><label id="firstPaymentAmount"></label></div>
			</td>
		</tr>
		<tr>	
			<td align="right">
				<label class="control-label np">贷款金额：</label>
			</td>
			<td>
				<div class="control-div np" id=""><label id="signLoanAmount"></label></div>
			</td>
			<td align="right">
				<label class="control-label np">贷款期限(月)：</label>
			</td>
			<td>
				<div class="control-div np" id=""><label id="loanMonth"></label></div>
			</td>
			<td align="right">
				<label class="control-label np">月付款：</label>
			</td>
			<td>
				<div class="control-div np" id=""><label id="amountMonthly"></label></div>
			</td>
		</tr>
		<tr>	
			<td align="right">
				<label class="control-label np">分期手续费：</label>
			</td>
			<td>
				<div class="control-div np" id=""><label id="stagesFee"></label></div>
			</td>
			<td align="right">
				<label class="control-label np">银行利率：</label>
			</td>
			<td>
				<div class="control-div np" id=""><label id="bankRate"></label></div>
			</td>
		</tr>
	</table>
</div>

<!-- public quote -->
<%@include file="/jsp/comm_js_include.jsp"%>

<script type="text/javascript">
	$(function(){
		document.getElementById("name").innerText=$.getUrlData("name");
		getCarsInfo();
	});

	var getCarsInfo=function(){
    $.dpAjax({
          url: '${basePath}/BaseCustomerController/getCarsLoanInfo',
          data: {"busiId":$.getUrlData("busiId")},
          success: function (datas) {
        	  var firstPaymentAmount=1;
        	  if(datas.ywBusinessLoan!=null){
        		  $('#firstBili').text(showNumber(datas.ywBusinessLoan.sfbl * 100));
        	  }
              var price=1;
              if(datas.ywBusinessLoan!=null){
	          	  document.getElementById("bankRate").innerText=datas.ywBusinessLoan.bankRate * 100;
	          	  document.getElementById("stagesFee").innerText=datas.ywBusinessLoan.stagesFee;
	          	  document.getElementById("amountMonthly").innerText=datas.ywBusinessLoan.amountMonthly;
	          	  document.getElementById("loanMonth").innerText=datas.ywBusinessLoan.loanMonth;
	          	  document.getElementById("signLoanAmount").innerText=datas.ywBusinessLoan.signLoanAmount;
	          	  document.getElementById("firstPaymentAmount").innerText=datas.ywBusinessLoan.firstPaymentAmount;
              }
              if(datas.ywBusinessCar!=null){
            	  price=datas.ywBusinessCar.price;
	          	  document.getElementById("price").innerText=price;
	          	  document.getElementById("numEngine").innerText=datas.ywBusinessCar.numEngine;
	          	  document.getElementById("vin").innerText=datas.ywBusinessCar.vin;
	          	  document.getElementById("nameCarModel").innerText=datas.ywBusinessCar.nameCarModel;
	          	  document.getElementById("nameCarSeries").innerText=datas.ywBusinessCar.nameCarSeries;
	          	  document.getElementById("nameCarBrand").innerText=datas.ywBusinessCar.nameCarBrand;
	          	  document.getElementById("colorCarDisplay").innerText=datas.ywBusinessCar.colorCarDisplay;
	          	  document.getElementById("seatNum").innerText=datas.ywBusinessCar.seatNum+"人";
              }
              if(datas.dzRegistration!=null){
	          	  document.getElementById("licensePlate").innerText=datas.dzRegistration.licensePlate;
              }
               parent.layer.close(parent.addlayer);
               return;
              if (datas.flag == "100200") {
                  $.fn.showDatas({"datas": datas});
                  return;
              }
          }
      });
  }
</script>
